
package ch.unifr.dokpe.htmlpicker.urlformater;

public class SimpleUrlFormater extends AbstractUrlFormater {

/**
*Replace url_count with the a counter searchNo incremented at each call
*@see ch.unifr.dokpe.htmlpicker.urlformater.DefaultUrlFormater#formatUrl(String url, String param, int searchNo)
*/

public String formatUrl(String url, String param, int searchNo){
	StringBuffer urlTotal = new StringBuffer();
	String tmp = url.replaceAll(count_symb, Integer.toString(searchNo));
	urlTotal.append((searchNo==1?"":connect) + tmp.replaceFirst(param_symb, param));
	return urlTotal.toString();
	}
 }
